<?php

namespace common\models;

use Yii;

/**
 * This is the model class for table "location".
 *
 * @property integer $id
 * @property string $uid
 * @property integer $province_id
 * @property string $province
 * @property integer $city_id
 * @property string $city
 * @property integer $area_id
 * @property string $area
 * @property string $details
 * @property integer $fee_type_id
 * @property string $fee_type_parms
 * @property integer $status
 * @property string $create_date
 * @property string $update_date
 * @property string $option
 */
class Location extends \yii\db\ActiveRecord
{
    /**
     * @inheritdoc
     */
    public static function tableName()
    {
        return 'location';
    }

    /**
     * @inheritdoc
     */
    public function rules()
    {
        return [
            [['uid'], 'required'],
            [['province_id', 'city_id', 'area_id', 'fee_type_id', 'status'], 'integer'],
            [['fee_type_parms', 'option'], 'string'],
            [['create_date', 'update_date'], 'safe'],
            [['uid'], 'string', 'max' => 50],
            [['province', 'city', 'area'], 'string', 'max' => 500],
            [['details'], 'string', 'max' => 800],
        ];
    }

    /**
     * @inheritdoc
     */
    public function attributeLabels()
    {
        return [
            'id' => 'Id',
            'uid' => '唯一标识',
            'province_id' => '省id',
            'province' => '省',
            'city_id' => '市id',
            'city' => '市',
            'area_id' => '区id',
            'area' => '区',
            'details' => '位置',
            'fee_type_id' => '计费类型',
            'fee_type_parms' => '计费参数',
            'status' => '状态',
            'create_date' => '创建日期',
            'update_date' => '更新日期',
            'option' => '备用字段',
        ];
    }
}
